home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
MOVIES
/
TOUR.DIR
/
00003_Script_3
< prev
next >
Wrap
Text File
|
1995-11-15
|
11KB
|
437 lines
on showHilite
global gCurrChan,gFirsChan,gLastChan,gTourButtons,gPrevHilite
put getAprop(gTourButtons,gCurrChan) into thisOne
goMovieGo
set m = the movie
testOverheadMenu
if m <> the movie then exit
updateController
if (the visibility of sprite gCurrChan) and rollOver(gCurrChan) then
put the puppet of sprite gCurrChan into pState
puppetSprite gCurrChan,false
put the castnum of sprite gCurrChan into it
set the puppet of sprite gCurrChan to pState
goMovieGo
if (it<>0) then
if gCurrChan <> gPrevHilite then
goMovieGo
rollo(thisOne)
put gCurrChan into gPrevHilite
end if
if the mouseDown then
goMovieGo
-- set n = the castNum of sprite gCurrChan
-- if n <> -1 then
-- set n = the name of cast n
-- if n = "TCR.PIC" or n = "TTR.PIC" then exit
-- end if
press(thisOne)
put 0 into gPrevHilite
if rollover(gCurrChan) then
goMovieGo
set m = the movie
doScript(thisOne)
if the movie <> m then exit
goMovieGo
norm(thisOne)
if gCurrChan < 5 then
repeat while the mouseDown
goMovieGo
end repeat
end if
end if
end if
else
if gCurrChan = 4 and rollOver(2) then set gCurrChan = 2
if gCurrChan <> gFirsChan and rollOver(gCurrChan - 1) then
--put "backward"
set gCurrChan = gCurrChan - 1
else
put gCurrChan+1 into gCurrChan
if gCurrChan > gLastChan then put gFirsChan into gCurrChan
end if
end if
else
goMovieGo
if gCurrChan = gPrevHilite then norm(thisOne)
put 0 into gPrevHilite
if gCurrChan = 4 and rollOver(2) then
set gCurrChan = 2
--put ">>>set special"
put gCurrChan && gFirsChan
end if
if gCurrChan <> gFirsChan and rollOver(gCurrChan - 1) then
--put "2backward"
set gCurrChan = gCurrChan - 1
else
put gCurrChan+1 into gCurrChan
if gCurrChan > gLastChan then put gFirsChan into gCurrChan
end if
end if
goMovieGo
end showHilite
on large
global gTourLabel, gCurLabelProp
set gTourLabel = (char 1 to 2 of gTourLabel)&"L"
set gCurLabelProp = gTourLabel
size "large"
end
on small
global gTourLabel, gCurLabelProp
set gTourLabel = (char 1 to 2 of gTourLabel)&"S"
set gCurLabelProp = gTourLabel
size "small"
end
--dmdabc
on size whichWay
if the framelabel <> "" then
if whichWay = "large" then go next
else go previous
else
if whichWay ="small" then
goSmaller
else goBigger
end if
end size
on controller
global gTourIsPlaying
if not gTourIsPlaying then playTour
if the visible of sprite 14 then
puppetSprite 15,0
set the visible of sprite 14 = 0
set the visible of sprite 15 = 0
else
puppetSprite 15,1
set the visible of sprite 14 = 1
set the visible of sprite 15 = 1
end if
end controller
on updateController
if the type of sprite 12 <> 16 then exit
set s = the stopTime of sprite 12
set w = the width of sprite 12
set p = the movieTime of sprite 12
set r = the right of sprite 12
set h = r-(w-(p*w)/s)
set the locH of sprite 15 = h
end updateController
on setController onOff
if onOff then
if the visible of sprite 14 then
puppetSprite 15,1
updateController
set the visibility of sprite 15 = 1
end if
else
puppetSprite 15, 0
set the visibility of sprite 14 = 0
set the visibility of sprite 15 = 0
end if
end setController
on goSmaller
global gTourLabel
set gTourLabel = (char 1 to 2 of gTourLabel)&"S"
put (label(gTourLabel)) into frameNumber
puppetSprite 15, 0
set the visibility of sprite 15 = 0
go frame frameNumber+1
setController 1
updateStage
end
on goBigger
global gTourLabel
set gTourLabel = (char 1 to 2 of gTourLabel)&"L"
put (label(gTourLabel)) into frameNumber
puppetSprite 15, 0
set the visibility of sprite 15 = 0
go frame frameNumber+1
setController 1
updateStage
end
on testVisitLabels castName
global gLabels
set hitList to value(field castName)
set c = count(hitList)
repeat with i = 1 to c
set theLabel = getAt(hitList, i)
if theLabel = "" then next repeat
set list = getAProp(gLabels, theLabel)
put i && theLabel
put getAt(list,1)
end repeat
put "done."
end
on lookUpTime curTime
global gTourLabel
set tLab = char 1 to 2 of gTourLabel
if tLab = "EM" then return ""
set hitList to value(string(field tLab))
set c = count(hitList)
repeat with i = 1 to c
set t = getPropAt(hitList, i)
if t > curTime then
set theLabel = getAt(hitList, i)
exit repeat
end if
end repeat
return theLabel
end lookUpTime
on visit
global gTourLabel, gTourTimeSS, gTourTimeMW, gTourTimeCL
--if gTourLabel = "EMS" then exit -- no links
if the type of sprite 12 = 16 then
put the movieTime of sprite 12 into curTime
end if
do "set gTourTime"&char 1 to 2 of gTourLabel & " = curTime"
set theLabel = lookUpTime(curTime)
if theLabel = "" then
set the visibility of sprite 9 = 0
exit -- no tour here
end if
puppetSprite 15,0
goGo(theLabel)
--go frame theLabel of movie getAt(xList,2)
end
on continue
playTour
end
on nextTour
global gTourLabel, gCurLabelProp
--puppetTransition 50,1,120,false
stopTour
put char 1 to 2 of gTourLabel into thisMovie
put char 3 of gTourLabel into thisSize
if thisMovie = "SS" then put "CL" into newMovie
else if thisMovie = "CL" then put "EM" into newMovie
else if thisMovie = "EM" then put "MW" into newMovie
else if thisMovie = "MW" then put "SS" into newMovie
set gTourLabel = newMovie&thisSize
addToRetrace
set the visible of sprite 9 = 0
set the visible of sprite 10 = 0
set gCurLabelProp = gTourLabel
go frame gTourLabel
patchPal
updateStage
end nextTour
on prevTour
global gTourLabel, gCurLabelProp
--puppetTransition 50,1,120,false
stopTour
put char 1 to 2 of gTourLabel into thisMovie
put char 3 of gTourLabel into thisSize
if thisMovie = "CL" then put "SS" into newMovie
else if thisMovie = "SS" then put "MW" into newMovie
else if thisMovie = "MW" then put "EM" into newMovie
else if thisMovie = "EM" then put "CL" into newMovie
put newMovie&thisSize
set gTourLabel = newMovie&thisSize
addToRetrace
set the visible of sprite 9 = 0
set the visible of sprite 10 = 0
set gCurLabelProp = gTourLabel
go frame gTourLabel
patchPal
updateStage
end prevTour
on playTour
global gTourLabel,gTourIsPlaying, gVolume
global gTourTimeSS, gTourTimeMW, gTourTimeCL
global gHelpOffScreen, gHelpPalette
if not voidP(gHelpOffScreen) and not gHelpOffScreen then
returnFromHelp
repeat while the mouseDown
end repeat
exit
end if
cursor 4
put "T"&(char 1 to 2 of gTourLabel)&".MOV" into preloadName
set cn = the number of cast preloadName
--
--
-- TBD DMD get time to return to if returning from an object OR
-- linking from an object in COs...
--
set tourTime = 0
do "set tourTime = gTourTime"&char 1 to 2 of gTourLabel
set oldLabel = the frame
set newLabel = label(gTourLabel)+1
if oldLabel <> newLabel then
set the controller of cast cn = false
set the visible of sprite 14 = 0
set the visible of sprite 15 = 0
end if
go frame newLabel
if gTourIsPlaying then
pauseTour
else
set the visible of sprite 9 to false
set the visible of sprite 10 to false
set the visible of sprite 13 = false
--puppetSprite 12, true
if not voidP(tourTime) then
set the movieTime of sprite 12 = tourTime
do "set gTourTime"&char 1 to 2 of gTourLabel & " = void"
end if
set the volume of sprite 12 to gVolume
set the stopTime of sprite 12 to (the duration of cast preloadName)
updateStage
set the movieRate of sprite 12 to 1
put true into gTourIsPlaying
updateStage
end if
cursor -1
end playTour
on pauseTour noButtons
global gTourLabel, gTourIsPlaying
global gTourTimeSS, gTourTimeMW, gTourTimeCL, gTourTimeEM, gTourLabel
if the type of sprite 12 = 16 then
if the movieTime of sprite 12 >= the stopTime of sprite 12 then set noButtons = 1
end if
if gTourIsPlaying then
--puppetSprite 12,true
--dmdabc
if the type of sprite 12 = 16 then
repeat while the volume of sprite 12 > 0
set the volume of sprite 12 to (the volume of sprite 12)/2
updateStage
delay 8
end repeat
set the movieRate of sprite 12 to 0
set curTime = the movieTime of sprite 12
do "set gTourTime" & char 1 to 2 of gTourLabel & "= curTime"
set s = lookUpTime(curTime)
set the visible of sprite 9 = s<>"" and not noButtons
set the visible of sprite 10 to not noButtons
end if
put false into gTourIsPlaying
end if
end pauseTour
on stopTour
global gTourLabel, gTourIsPlaying
global gTourTimeSS, gTourTimeMW, gTourTimeCL, gTourTimeEM
if the type of sprite 12 = 16 then
do "set gTourTime" & char 1 to 2 of gtourlabel & "= the movietime of sprite 12"
end if
-- if gTourIsPlaying then
if marker(0) <> the frame then
setController 0
set the visible of sprite 9 to false
set the visible of sprite 10 to false
repeat with i = 1 to 8
set the volume of sprite 12 to (the volume of sprite 12)-32
delay 8
end repeat
--set the directToStage of cast(the castNum of sprite 12) to false
set the controller of cast (the castNum of sprite 12) to false
set the movieRate of sprite 12 to 0
set the movieTime of sprite 12 to 0
puppetSprite 12, false
put "T"&(char 1 to 2 of gTourLabel)&".MOV" into preloadName
repeat while true
unloadcast preloadName
if not(the loaded of cast preloadName) then exit repeat
end repeat
put false into gTourIsPlaying
go to (the frame)-1
end if
end stopTour
on goMovieGo
global gTourIsPlaying
if the castNum of sprite 12 > 0 then
if the castType of cast the castnum of sprite 12 <> #digitalVideo then exit
if the movieRate of sprite 12 = 0 then
if gTourIsPlaying then
if the movietime of sprite 12 >= the stoptime of sprite 12 then
setcontroller 0
go to the frame - 1
end if
pauseTour
end if
else if not gTourIsPlaying then
playTour
end if
end if
end goMovieGo